<?php
	require_once (dirname(__FILE__)."/../config/Config.inc");
	require_once (dirname(__FILE__)."/../config/api.inc");
	
	$parm = requestArrayParm($_REQUEST);
	
	$result['status'] = '1';
	
	unset($wheres,$pages,$sorts,$list);
	$wheres['status'] = '1';
	
	if(!empty($parm['pt_name']))
	{
		$wheres['pt_name'] = array('like',$parm['pt_name']);
	}
	
	$sorts['fbtime'] = 'desc';
	
	$pages['page'] = getParam('page','request',1);
	$pages['rows'] = 20;	
	
	$resData =_SqlTool::getList('zhuanrang',$wheres,$pages, $sorts);
	foreach ($resData['list'] as $key => $val)
	{
		$val['tztime'] = date('Y-m-d',$val['tztime']);
		$val['dqtime'] = date('Y-m-d',$val['dqtime']);
		$val['fbtime'] = date('Y-m-d',$val['fbtime']);
		$list[] = $val;
	}
	
	$result['list'] = $list;
	
	$result['pages'] = $resData['pages'];
	
	echoJSON($result);